package com.txf.simple.ui.activity;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;

import com.aspsine.swipetoloadlayout.SwipeToLoadLayout;
import com.txf.simple.R;
import com.txf.simple.ui.view.SwipeRefreshView;

/**
 * @author txf
 * @Title RecyclerView 上拉加载 上拉刷新 Activity 基类
 * @package com.txf.simple.ui.activity
 * @date 2016/11/22 0022
 */
public class AbsBaseRecyclerRefreshAct extends AbsBaseActivity{
    private RecyclerView swipe_target;
    private SwipeToLoadLayout swipeToLoad;
    private SwipeRefreshView swipe_refresh_header;
    @Override
    protected View buildContentView() {
        return LayoutInflater.from(this).inflate(R.layout.recyclerview_refresh_layout, null);
    }
    @Override
    protected void initViews() {
        swipe_target = (RecyclerView) findViewById(R.id.swipe_target);
        swipeToLoad = (SwipeToLoadLayout) findViewById(R.id.swipeToLoad);
        swipe_refresh_header = (SwipeRefreshView) findViewById(R.id.swipe_refresh_header);
        swipeToLoad.setRefreshEnabled(true);
        swipeToLoad.setLoadMoreEnabled(true);
    }
}
